import request from "@/utils/request";

// 查询工作计划列表
export function getWorkPlansByUserId(userId) {
  return request({
    url: `/system/workPlan/user/${userId}`,
    method: "get",
  });
}

// 新增工作计划
export function addWorkPlan(data) {
  return request({
    url: "/system/workPlan",
    method: "post",
    data: data,
  });
}

// 删除工作计划
export function deleteWorkPlan(id) {
  return request({
    url: `/system/workPlan/${id}`,
    method: "delete",
  });
}

// 修改工作计划
export function updateWorkPlan(data) {
  return request({
    url: "/system/workPlan",
    method: "put",
    data: data,
  });
}

// 查询单个工作计划详情
export function getWorkPlanDetail(id) {
  return request({
    url: `/system/workPlan/${id}`,
    method: "get",
  });
}
